<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>{{$shudan->biaoti}} - 书单 - 夜读书</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="author" content="夜读书">
    <meta name="description" content="夜读书中文网">
    <meta name="keywords" content="读书,阅读,小说,文学">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{{ asset('/bootstrap-3.3.5-dist/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('/style/css/yds.css') }}">
    <script src="{{ asset('/scripts/jquery/jquery-1.11.3.min.js') }}"></script>
    <script src="{{ asset('/bootstrap-3.3.5-dist/js/bootstrap.min.js') }}"></script>
</head>
<body class="docs">
@include('books.partials.navtop')
@include('books.partials.nav')

<div class="docs-wrapper container">

    <article>
        <div class="sdbiaoti">
            <a class="pull-left" href="{{url('u')}}/{{$shudan->uid}}/ushudanlist" title="{{ $shudan->users->user_name }}">
            @if($shudan->users->avatar_file_min!="")
                <img src="http://www.yedushu.com/{{ $shudan->users->avatar_file_min }}">
            @else
                <img src="http://www.yedushu.com/usersface/default/avatar-min.png">
            @endif
            </a>
            <h1>{{$shudan->biaoti}}</h1>
            <span class="hyname"><a href="{{url('u')}}/{{$shudan->uid}}/ushudanlist">{{$shudan->users->user_name}}</a></span><span class="hytime">发布于{{date('Y-m-d H:i',$shudan->add_time)}}</span><span class="click">有{{$shudan->click_count}}人感兴趣</span>
        </div>
        <div class="sdjieshao">{!!$shudan->jieshao!!}</div>
        @if(Session::get('name') == $shudan->users->user_name && Session::get('nameid') == $shudan->users->uid)
        <div class="editsd"><a href="{{asset('shudaninfo/edit')}}/{{$shudan->id}}">编辑</a></div>
        @endif
        @foreach($books as $book)
        @if($book!=null)
        <div class="mods shudaninfo">
            <dl>
                <dt><a href="{{asset('info')}}/{{$book->book_id}}" class="biaoti" target="_blank"><img src="{{asset($book->bimg)}}"></img></a></dt>
                <dd><a href="{{asset('info')}}/{{$book->book_id}}" class="biaoti" target="_blank">{{$book->book_name}}</a><span class="zuozhe">{{$book->zuozhe}}</span></dd>
                <span class="jieshao">{{mb_substr(strip_tags($book->neirongjianjie), 0, 100)}}...</span>
                @if(Session::get('name') == $shudan->users->user_name && Session::get('nameid') == $shudan->users->uid)
                <span class="delsd"><a href="{{asset('shudaninfo')}}/{{$shudan->id}}/remove/{{$book->book_id}}" onclick="javascript:return p_del($str='{{$book->book_name}}')">删除</a></span>
                @endif
            </dl>
        </div>
        @else
          @if(Session::has('name'))
            <div class="mods shudaninfo">
                <dl>
                收入书单的图书已不存在于夜读书网站，<a href="{{asset('shudaninfo/edit')}}/{{$shudan->id}}">编辑书单就可以清除此条信息！</a>
                </dl>
            </div>
          @endif
        @endif
        @endforeach

    </article>

    <section class="sidebar">
        <div class=""><a href="{{asset('addshudan')}}" class="btn btn-danger" style="color:white">我也来分享书单</a></div>
        <div class="shudan">
            <h2>推荐书单</h2>
            <ul class="sdstyled">
            @foreach($shudanlists as $shudanlist)
                <li>
                <a href="{{asset('shudaninfo')}}/{{$shudanlist->id}}" title="{{$shudanlist->biaoti}}">
                 @if( mb_strlen($shudanlist->biaoti)>11 )
                    {{ mb_substr($shudanlist->biaoti, 0, 11) }}...
                @else
                    {{ $shudanlist->biaoti}}
                @endif
                 </a></li>
            @endforeach
            </ul>
        </div>
    </section>

</div>

@include('books.partials.footer')

<script language="javascript">
function p_del($str) {var msg= "《" + $str + "》" + "\n\n您真的确定要从书单中移除本书吗？\n\n";if (confirm(msg)==true){
return true;}else{return false;}}
</script>

</body>
</html>
